//
//  FileCell.swift
//  YueChat
//
//  Created by IMac on 2024/9/23.
//

import UIKit

class FileCell: BaseChatCell {

    @IBOutlet weak var cardName: UILabel!
    
    @IBOutlet weak var remark: UILabel!
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
    // 计算单元格的高度
    override func baseCellHeight(message: DMCCMessage, chatType: Bool, mulSelect: Bool, isMySend: Bool) {
        
        message.msgCellWidth = 265;
        message.msgCellHeight = 85;
    }
    
    override func setMessage(_ message: DMCCMessage) {
        super.setMessage(message)
        if let fileContent = message.content as? OsnFileMessageContent {
            self.cardName.text = fileContent.name
            self.remark.text = "\(fileContent.fileSize / 1024)KB"
        }
        
        
        

        
//        if isMulSelect {
//            self.leftMsg.constant = 50
//        } else {
//            self.leftMsg.constant = 15
//        }
    }
}
